System, method and computer program product for recovering stub files

ABSTRACT

A read cache may include portions of files stored on media of a media library. Embodiments described herein may include systems and methods for restoring a read cache, including restoring stub files to a read cache on an ad hoc basis.

TECHNICAL FIELD

This disclosure relates to recovering stub files. Even moreparticularly, this disclosure relates to recovering stub files used torespond to requests for file data while a tape is loaded.

BACKGROUND

Businesses, governmental organizations and other entities areincreasingly saving large volumes of data necessary for dailyoperations. This data represents a significant asset for these entities.Consequently, data loss, whether accidental or caused by maliciousactivity, can be costly in terms of wasted manpower, loss of goodwillfrom customers, loss of time and potential legal liability. To ensureproper protection of data for business and legal purposes (e.g., toensure quick recovery of data in the event of a disaster, to comply withdocument retention requirements, etc.), these entities often back updata to a physical media, such as magnetic tapes or optical disks on aregular basis.

Traditional backup systems placed an application server, backup server,source device, destination device and a local area network (“LAN”) inthe data path of backup operations. Under these systems, the LANs werebecoming overburdened by the amount of data being copied. Often, thebackup window (the period in which data unavailable for normaloperations in order to permit backup) was too short to achieve acomplete backup of data. Accordingly, many entities implemented StorageArea Networks (“SAN”) to relieve the burden of mass data storage andbackup from the LAN, freeing the LAN for more immediate data storage andmanipulation operations. In SANs data from multiple machines on anetwork may be backed up to a remote media library. Centralized databackup allows storage problems to be identified at one location and hasthe advantage of increased efficiency.

One example of a media library commonly used in enterprise backupsystems is a magnetic tape library. In a typical magnetic tape library,tapes are contained in cartridges and the tape library contains multiplecartridge slots in which tape cartridges can be stored. The tapecartridges are physically moved between cartridge slots and tape drivesby a robot. The robot is controlled by access commands received from thehost devices on the network. When specific data is required, the hostdevice determines which cartridge slot contains the tape cartridge thatholds the desired data. The host device then transmits a move-elementcommand to the robot and the robot moves the tape cartridge.

Recently, the Linear or Long Term File System (LTFS) FormatSpecification by IBM and Ultrium (hereby fully incorporated by referencein its entirety for all purposes) has been developed, which defines afile system for LTO-5 tapes, LTO-6 tapes and may be extended to othertapes using an eXtensible Markup Language (XML) schema architecture.This file system support allows the use of an LTFS-formatted tape as ifit were a file system. Files and directories may appear in a directorylisting, files may be dragged and dropped from tape, data may beaccessed at the file level, etc.

SUMMARY

Embodiments described herein provide systems and methods for recoveringa read cache. One embodiment of a system for recovering a read cache caninclude an archive node appliance. The archive node appliance cancomprise a processor, a data store and a computer readable mediumstoring a set of computer executable instructions executable on theprocessor. The instructions can be executable to maintain a read cache,receive a request from a network file system interface client for afirst file at a first location, locate the first file at a secondlocation on a media of a media library, read the first file from themedia of the media library and populate the read cache with a stub filefor the first file using file data read from the media.

Another embodiment can include a computer program product comprising anon-transitory computer readable medium storing a set of computerexecutable instructions. The computer instructions can be executable toperform a method comprising: maintaining a read cache, receiving arequest from a network file system interface client for a first file ata first location, locating the first file at a second location on amedia of a media library, reading the first file from the media of themedia library and populating the read cache with a stub file for thefirst file using file data read from the media.

Yet another embodiment can include a method for recovering a read cachecomprising: maintaining a read cache comprising portions of files storedon media of a media library, receiving a request from a network filesystem interface client for a first file at a first location, locatingthe first file at a second location on a media of the media library,wherein the second location mirrors the first location, reading thefirst file from the media of the media library and populating the readcache with a stub file for the first file from file data read from themedia.

BRIEF DESCRIPTION OF THE DRAWINGS

The drawings accompanying and forming part of this specification areincluded to depict certain aspects of the systems and methods. A clearerimpression of the components and operation of systems provided willbecome more readily apparent by referring to the exemplary, andtherefore nonlimiting, embodiments illustrated in the drawings, whereinidentical reference numerals designate the same components. Note thatthe features illustrated in the drawings are not necessarily drawn toscale.

FIG. 1 is a diagrammatic representation of one embodiment of systemcomprising an Archive Node Appliance.

FIG. 2 is a diagrammatic representation of one embodiment of an ArchiveNode Appliance.

FIG. 3 is a diagrammatic representation of one embodiment of an ArchiveNode Appliance.

FIG. 4 is a diagrammatic representation of one embodiment of an ArchiveNode Appliance.

FIGS. 5A-5D are diagrammatic representations of one embodiment of aschema.

FIG. 6 is a flow chart illustrating one embodiment of a method forstoring a file.

FIG. 7 is a flow chart illustrating one embodiment of restoring a readcache.

FIG. 8 is a flow chart illustrating one embodiment of ad hoc restorationof a stub file.

DETAILED DESCRIPTION

The systems and methods and the various features and advantageousdetails thereof are explained more fully with reference to thenonlimiting embodiments that are illustrated in the accompanyingdrawings and detailed in the following description. Descriptions ofwell-known starting materials, processing techniques, components andequipment are omitted so as not to unnecessarily obscure the descriptionin detail. It should be understood, however, that the detaileddescription and the specific examples, while indicating preferredembodiments, are given by way of illustration only and not by way oflimitation. Various substitutions, modifications, additions and/orrearrangements within the spirit and/or scope of the underlyinginventive concept will become apparent to those skilled in the art fromthis disclosure. Embodiments discussed herein can be implemented insuitable computer-executable instructions that may reside on a computerreadable medium (e.g., a hard disk drive, flash drive or other memory),hardware circuitry or the like, or any combination.

Before discussing specific embodiments, embodiments of a hardwarearchitecture for implementing certain embodiments is described herein.One embodiment can include one or more computers communicatively coupledto a network. As is known to those skilled in the art, the computer caninclude a central processing unit (“CPU”), at least one read-only memory(“ROM”), at least one random access memory (“RAM”), at least one harddrive (“HD”), and one or more input/output (“I/O”) device(s). The I/Odevices can include a keyboard, monitor, printer, electronic pointingdevice (such as a mouse, trackball, stylus, etc.) or the like. Invarious embodiments, the computer has access to at least one database.

ROM, RAM, and HD are computer memories for storing data andcomputer-executable instructions executable by the CPU. Within thisdisclosure, the term “computer-readable medium” is not limited to ROM,RAM, and HD and can include any type of data storage medium that can beread by a processor. In some embodiments, a computer-readable medium mayrefer to a data cartridge, a data backup magnetic tape, a floppydiskette, a flash memory drive, an optical data storage drive, a CD-ROM,ROM, RAM, HD, or the like.

At least portions of the functionalities or processes described hereincan be implemented in suitable computer-executable instructions. Thecomputer-executable instructions may be stored as software codecomponents or modules on one or more computer readable media (such asnon-volatile memories, volatile memories, DASD arrays, magnetic tapes,floppy diskettes, hard drives, optical storage devices, etc. or anyother appropriate computer-readable medium or storage device). In oneembodiment, the computer-executable instructions may include lines ofcompiled C++, Java, HTML, or any other programming or scripting code.

Additionally, the functions of the disclosed embodiments may beimplemented on one computer or shared/distributed among two or morecomputers in or across a network. Communications between computersimplementing embodiments can be accomplished using any electronic,optical, radio frequency signals, or other suitable methods and tools ofcommunication in compliance with known network protocols.

As used herein, the terms “comprises,” “comprising,” “includes,”“including,” “has,” “having” or any other variation thereof, areintended to cover a non-exclusive inclusion. For example, a process,article, or apparatus that comprises a list of elements is notnecessarily limited to only those elements but may include otherelements not expressly listed or inherent to such process, article, orapparatus. Further, unless expressly stated to the contrary, “or” refersto an inclusive or and not to an exclusive or. For example, a conditionA or B is satisfied by any one of the following: A is true (or present)and B is false (or not present), A is false (or not present) and B istrue (or present), and both A and B are true (or present).

Additionally, any examples or illustrations given herein are not to beregarded in any way as restrictions on, limits to, or expressdefinitions of, any term or terms with which they are utilized. Instead,these examples or illustrations are to be regarded as being describedwith respect to one particular embodiment and as illustrative only.Those of ordinary skill in the art will appreciate that any term orterms with which these examples or illustrations are utilized willencompass other embodiments which may or may not be given therewith orelsewhere in the specification and all such embodiments are intended tobe included within the scope of that term or terms. Language designatingsuch nonlimiting examples and illustrations include, but is not limitedto: “for example,” “for instance,” “e.g.,” “in one embodiment.”

It may be desirable to provide a file system utilizing media libraries.To that end, attention is now directed to systems and methods forimplementing a file system utilizing a tape library. In particular,embodiments may present a network file system interface to one or morehost devices. These host devices may utilize the network based filesystem to organize, store, read or perform other operations inassociation with files. These files may be managed in conjunction with atape library. Specifically, commands in a network file system protocolmay be received. These commands may be associated with operations to beperformed on files, including operations associated with theorganization, storage or retrieval of those files. Library controlfunctionality that allows tapes in the tape library to be tracked andtapes to be moved into and out of drives and storage slots is utilizedto manage the tape library.

In certain embodiments, LTFS (including Library LTFS) may be employed inconjunction with the tape library such that the tapes in the tapelibrary may be formatted using LTFS. Accordingly, operations withrespect to the files on the tapes in the tape library may be performedusing LTFS. A mapping may be maintained between the files visiblethrough the networked based file system presented to the host devicesand the corresponding location of those files on an LTFS tape in thetape library or other location. It should be noted here that whileembodiments as discussed include a tape library having tapes formattedaccording to LTFS, other types of media libraries that utilize media ofthe same or different type where the media may be formatted according tothe same or another type of file system may be employed in otherembodiments.

To increase performance, embodiments of such a system may include a datastore, which may be on a storage medium that is relatively faster forrandom accesses such as a disk. Files that are stored by the hostdevices using the networked based file system may initially be stored onthe disk. These files are subsequently migrated to tapes in the tapelibrary. Once a file has been stored on tape, a stub file that containsa portion of the file may remain on the data store, with the remainderof the file being deleted from the data store. When the file issubsequently accessed, the initial requests for file data can beserviced using data from the stub file while the tape containing thefull file loads. The use of a stub file allows time for the tape to loadand file data to be read from the tape, reducing or preventing timeouts.

In some cases, previously stored stub files may be deleted, becomecorrupted or otherwise become unusable. Therefore, it may be desirableto implement a stub file recovery scheme. According to one embodiment,ad hoc stub file recovery can be implemented in which individual stubfiles are recovered as needed. If a stub file is missing, corrupted orotherwise unusable, the stub file can be repopulated when acorresponding file is requested.

FIG. 1 is a diagrammatic representation of a system in which a medialibrary is managed to present a network based file system to a pluralityof hosts (i.e. host devices). Archive Node Appliance 115 can compriseone or more communications interfaces 150, 151 (e.g., fibre channelinterface, Ethernet port or any other type of communication interfaceknown in the art) to connect Archive Node Appliance 115 to network 120and network 122. In this embodiment, hosts 110, 111, 112 and 113 arecoupled to an Archive Node Appliance 115 via network 120. Network 120can comprise the Internet, a LAN, a WAN, a SAN, a wireless network, orany other communications link, network or protocol known in the art. Forexample, network may comprise an Ethernet based network employingTCP/IP.

Archive Node Appliance 115 is coupled to media library 130 via network122 (Archive Node Appliance 115 and media library 130 may becollectively referred to as an Archive Node or a Networked Attached TapeArchive (NATA)). Network 122 can comprise the Internet, a LAN, a WAN, aSAN, a wireless network, or any other communications link, network orprotocol known in the art. For example, network 122 may comprise a fibrechannel network (such as a fibre channel SAN) or a SCSI bus, such as aSerial Attached SCSI (SAS) bus. While Archive Node Appliance 115 hasbeen depicted as a standalone device in this embodiment, it should beunderstood that Archive Node Appliance 115 can be implemented in avariety manners and in a variety of architectures. For example, whenimplemented in a SAN, the Archive Node Appliance may be part of arouter, part of a media library or at any other location in acommunication path between hosts and a media library.

Media library 130 may comprise a tape library or another media libraryknown in the art such as optical jukeboxes. A tape library, as would beunderstood by one of ordinary skill in the art, typically consists ofone or more tape drives that can read/write data from/to magnetic tape(contained within cartridges also referred to herein as tapes or tapecartridges), eject tape cartridges and perform other operations. Aseries of slots stores the tape cartridges when they are not in a driveand a robot moves the magnetic tape cartridges between the drives andslots.

As an example, media library 130 can comprise drives 131-133, robot 134and slots 135 (individually slots 135 a-j). It should be noted that amedia library that employs a single robot or multiple robots in anexpandable or modular configuration, but presents itself as a singlemedia library to a network, or any other configuration of one or moremedia libraries, either physical or virtual, that can present itself asa single media library can be considered a single media library for thepurposes of this application. It will also be noted that though theembodiment depicts only a single media library, other embodiments may becoupled to, and utilize, multiple media libraries.

Archive Node Appliance 115 comprises a computer processor 152 and acomputer readable memory 154 (e.g. RAM, ROM, magnetic disk, optical diskand/or any other computer readable memory known in the art) that canstore computer instructions 155 that are executable by processor 152.Computer instructions 155 can be implemented as hardware, software,firmware, some combination or in any other suitable manner as would beunderstood by those of ordinary skill in the art.

In operation, computer instructions 155 can be executable such thatArchive Node Appliance 115 can present a network based file system (i.e.a file system accessible over a network) to hosts 110, 111, 112, 113,allowing these hosts to organize, store or retrieve files or performother operations associated with a file system. Operations that can beperformed using such network based files systems are understood by thoseof skill in the art. This network based file system may be for example,a Network File System (NFS) based file system, a Common Internet FileSystem (CIFS) based file system, a File Transfer Protocol (FTP) basedfile system, a Secure Copy Protocol (SCP) based file system, aRepresentational State Transfer (REST) based file system, or a filesystem based on any another type of protocol which allows a file systemto be accessed over a network.

Computer instructions 155 may thus be executable to implement operationsassociated with the presented network based file system in conjunctionwith media library 130. More specifically, in one embodiment, drives131, 132, 133 may be LTO-5, LTO-6 compliant drives and tapes in medialibrary 130 may be formatted according to LTFS (as disclosed in theLinear Tape File System Format Specification Version 2.0, or otherversion by IBM, hereby incorporated by reference in its entirety). Inother embodiments the drives may be compliant with other types of tapesand the tapes may be formatted according to other tape file systems.Computer instructions 155 may be executable to store files receivedthrough the networked based file system on the LTFS tapes in the medialibrary 130 and maintain mapping information between the files visiblethrough the network based file system and the location of those files inthe media library.

The files visible through the network based file system can be filesstored at an intermediate location (e.g., a disk based data store ormemory). When a file visible through the network based file system isaccessed, computer instructions 155 can be executed to provide access tothe file from the intermediate location. File operations can thus occuron the file at the intermediate location rather than directly on thefile on the tape.

In some cases, the file may not reside or reside entirely in theintermediate storage when the file is accessed. Therefore, the computerinstructions 155 can also be executable to determine the location of theaccessed file in the media library 130 using the mapping information,locate and load the correct tape into a drive, and use LTFS to mount theLTFS file system on the tape and access the file to, for example, readthe remainder of the file into the intermediate storage.

To increase performance, in some embodiments, it may be desired to storefiles on computer readable memory 154 when they are initially received,and migrate these files to the media library 130 at a later point.Computer instructions 155 may therefore be executable to store filesstored by hosts using the network based file system to the computerreadable memory 154. At some later point, the computer executableinstructions 155 may be executable to migrate the file from the computerreadable memory 154 to the media library 130. In this case, computerexecutable instructions 155 are executable to maintain mappinginformation between the files visible through the network based filesystem and the location of those files on the computer readable memory154 or the media library 130.

The use of LTFS in conjunction with the media library 130 can afford anumber of advantages when employed by an Archive Node Appliance 115 toimplement a networked based file system. One important advantage is thatthe file system structure presented through the file system may besubstantially mirrored on the tapes of the media library 130.Accordingly, if there is a failure of the Archive Node Appliance 115 ormedia library 130, the files on the tapes of the media library 130 maybe easily located, as they are stored according to a structure that issubstantially identical to that defined by the users at the hosts usingthe network based file system.

Furthermore, the use of LTFS means that tapes on which files of thenetwork based file system are stored may be mounted and the file systemon these tapes accessed, using any computing device which supports LTFS.As LTFS is commonly provided for many of today's operating systems,these tapes (and files stored thereon) may be easily accessed, allowingfiles to be restored or otherwise manipulated without requiringspecialized software.

To put a finer point on some of the advantages offered by embodimentsdisclosed herein, the functionality and performance of a network basedfile system may be achieved while simultaneously achieving the benefitsof storage on a medium typically used for backup without the need forany type of specific backup application. The use of an Archive NodeAppliance may abstract the media library to implement a network basedfile system and hide the corresponding complexity entailed by the use ofsuch a media library. By using a computer readable memory which isrelatively faster for random accesses such as a disk in conjunction withthe media library to provide the network based file system the ArchiveNode Appliance may provide the speed customarily associated with anetwork based file system by masking the latency of the use of the medialibrary. Simultaneously, the use of such a media library provides thebenefit of having files automatically stored on a storage mediatypically used for backup without specific action by users or the use ofa backup application.

Furthermore, the use of LTFS in conjunction with the media libraryallows the file system created by users using the network based filesystem to be mirrored on the storage media. Thus, when restoring filesfrom the storage media of the media library in the event of a failure,no specialized structural knowledge is required. The files on thestorage media are in the locations where they were placed by the usersin conjunction with the network based file system. Moreover, since LTFSis commonly supported data on the storage media may be easily accessedwithout the need for specialized software such as a backup application.

It may be helpful here to illustrate architectures for certainembodiments of an Archive Node. FIG. 2 depicts one embodiment of anarchitecture for an Archive Node that may be used in instances whererelatively lower capacity is desired. Here, the Archive Node Appliance200 may comprise one or more Gigabit Ethernet ports 210. These GigabitEthernet ports 210 may be dedicated to providing a user interface or fora systems management interface such as the Intelligent ManagementPlatform Interface (IPMI). The Archive Node Appliance 200 may alsocomprise one or more Ethernet ports 220 for data connections. TheseEthernet ports may be 10BASE-T, 100BASE-TX, 1000BASE-T, 10GBASE-LR,10GBASE-LW, 10GBASE-LRM, 10GBASE-ZR, 10GBASE-LX4, 10BASE-CX4, etc. ormay be of a mixture of types. In operation these Ethernet ports 220 maybe coupled to hosts, such that a network based file system may beprovided by the Archive Node Appliance 200 and hosts may interface withthe Archive Node Appliance 200 using these Ethernet ports 220 to utilizethe network based file system, for example, by storing or retrievingfiles using the network based file system. The network based file systemmay be implemented using a file system implemented in association withuser space such as the File system in User space (FUSE) file system;using a kernel-based file system such as Ext2, Ext3, Ext4 Next3, etc.;or almost any other type of file system desired.

Archive Node Appliance 200 also includes a data store 230. Data store230 may be a computer readable memory used to store computer executableinstruction, files stored using the network based file system or otherdata utilized by Archive Node Appliance 200, as will be elaborated on inmore detail subsequently. To ensure some degree of redundancy or faulttolerance, data store 230 may implemented as Redundant Array ofIndependent Disks (RAID) storage having around 5 TB-8 TB of availablestorage. Archive Node Appliance 200 also comprises a SAS port 250through which the Archive Node Appliance 200 is coupled to media library260 via a SAS bus. Media library 260 may be an IBM TS3100 tape libraryhaving one or more LTO-5 compliant drives 262 and capable of holding 24tape cartridges or an IBM TS3200 tape library having one or more LTO-5compliant drives 262 capable of holding 48 tape cartridges. In otherembodiments, the media library may include LTO-6 compliant drives orother types of drives.

While it should be noted that Archive Node Appliance 200 may beimplemented in substantially in any form factor desired, in oneembodiment Archive Node Appliance may be based on a rack-mount storageformat and may, for example, be contained in a chassis of a 1U, 2U or 3Uform factor with the data store residing internally to the chassis.

Moving on, FIG. 3 depicts one embodiment of an architecture for anArchive Node that may be used in instances where relatively greaterstorage capacity is required, such as in, for example, large datainstallations or a cloud storage provider. In this embodiment, theArchive Node Appliance 300 may comprise one or more Gigabit Ethernetports 310. These Gigabit Ethernet ports 310 may be dedicated toproviding a user interface or for a systems management interface. TheArchive Node Appliance 300 may also comprise one or more Ethernet ports320 for data connections. These Ethernet ports may be 10BASE-T,100BASE-TX, 1000BASE-T, 10GBASE-LR, 10GBASE-LW, 10GBASE-LRM, 10GBASE-ZR,10GBASE-LX4, 10BASE-CX4, etc. or may be of a mixture of types. Inoperation these Ethernet ports 320 may be coupled to hosts, such that anetwork based file system may be provided by the Archive Node Appliance300 and hosts may interface with the Archive Node Appliance 300 usingthese Ethernet ports 320 to utilize the network based file system, forexample, by storing or retrieving files using the network based filesystem. As noted above, the network based file system may be implementedusing a file system implemented in association with user space such asthe File system in User space (FUSE) file system; using a kernel-basedfile system such as Ext2, Ext3, Ext4 Next3, etc.; or almost any othertype of file system desired. Archive Node Appliance 300 also includes adata store 334.

Data store 334 may be a computer readable memory used to store computerexecutable instructions, files stored using the network based filesystem or other data utilized by Archive Node Appliance 300. To ensureredundancy or fault tolerance, data store may comprise a mirrored systemdisk 332 comprising the computer executable instruction and other datautilized by the Archive Node Appliance 300 during operation andRedundant Array of Independent Disks (RAID) storage coupled to theArchive Node Appliance 300 through SAS port 336. The RAID storage may beused to store files associated with the network based file system andmay have around 9 TB-150 TB of available storage. Archive Node Appliance300 also comprises fibre channel ports 350 through which the ArchiveNode Appliance 300 is coupled to media library 360 via a fibre channelswitch 362. These fibre channel ports 350 may be, for example, 16, 8, 4or 2 GB fibre channel ports. Media library 360 may be an IBM TS3500 tapelibrary having one or more LTO-5 compliant drives 364 and capable ofholding around 20,000 tapes, a media library having one or more LTO-6compliant drives or a media library supporting other types of tapes thatcan be formatted according to a tape file system.

Again, while it should be noted that Archive Node Appliance 300 may beimplemented in substantially in any form factor desired, in oneembodiment Archive Node Appliance 300 may be based on a rack-mountstorage format and may for example, be contained in a chassis of a 1U,2U or 3U form factor with the data store residing internally to thechassis or portions of the data store, such as the RAID storage residingexternal to the chassis.

Turning now to FIG. 4, one embodiment of a functional architecture foran Archive Node is depicted. Archive Node Appliance 400 may provide anoperator interface 402 through which the Archive Node Appliance 400 maybe configured. Such an operator interface 402 may be provided, forexample, using a network based interface such as a set of web pages orthe like. Archive Node Appliance 400 is coupled to tape library 410,comprising a set of LTO-5, LTO-6 or other tape compliant drives some ofwhich may be LTFS (or other tape file system) formatted tapes. In oneembodiment, each tape in tape library 410 may be used to store data thatis compressed, data that is encrypted, data that is both compressed andencrypted or data that is neither compressed nor encrypted.

Archive Node Appliance 400 comprises Filesystem in Userspace (FUSE)module 412 that may presents a file system to a local operating system.A network file system interface module 413 provides access to all or aportion of the FUSE file system as one or more shared volumes (e.g., asa hierarchical file system with directories, etc.) that can be accessedusing an interface that operates according to network file systemprotocol 414 such as NFS, CIFS, FTP, REST etc. Data associated with theshared volumes is stored on one or more partitions of data store 418 (acomputer readable memory), where the structure of the partitions of thedata store 418 may, or may not, correspond to the structure of theshared volumes or to the structure of the file system presented by FUSEmodule 412.

Directory operations module 420 is configured to process any directoryoperations that are received by FUSE module 412. I/O operations module422 is configured to process any input or output operations involvedwith the reading or the storing of files associated with the file systempresented by the FUSE module 412. These operations include, for example,the writing of files to the data store 418, the reading of files fromthe data store 418, the deletion of files from the data store 418, thereading of files from a tape in the tape library 410 or other operationsassociated with the data store 418 or tape library 410.

These I/O operations may involve the use of library control module 434,LTFS module 424, LTFS management module 432 and index 436. The locationof each tape within the tape library 410 may be maintained in index 436(e.g. in which slot or drive each tape is located, in which library thetape is located if multiple tape libraries are in use, etc.).Additionally, in one embodiment, what type of data is stored on eachtape (encrypted, compressed, neither encrypted nor compressed, etc.) mayalso be maintained.

Library control module 434 is configured to control the movement of thetapes in the tape library 410, including ejecting the tapes from thedrives of the tape library 410, and the movement of tapes to and fromslots of the tape library 410 and in and out of drives of the tapelibrary using the robot. LTFS management module 432 is configured tomount or unmount the LTFS file system on a particular tape in a drive ofthe tape library 410. LTFS module 424 is configured to perform LTFSoperations with respect to an LTFS mounted file system.

Library control module 434, LTFS module 424, LTFS management module 432and index 436 may also be utilized by file migration module 426. Filemigration module 426 is configured to move files from data store 418 totape library 410 based on policies 428. File mapping module 438maintains map 442 which correlates a file visible through the FUSE filesystem to its corresponding location in the tape library 410.Specifically, a mapping between the location (for example the path) andname of the file with respect to the FUSE file system, the name andlocation of that file in the data store 418 and the name and location ofthat file on one or more tapes in the tape library 410 may be maintainedin map 442.

Policies 428 may, or may not be, user configured and may be associatedwith storage of the files or the migration of files from the data store418 to tapes in the tape library 410. Such policies may specify, forexample, how long to wait before migrating a file (referred to herein asa migration timeout period), whether the files are to be replicated whenmigrated (e.g. stored in conjunction with multiple Archive Nodes as willbe elaborated on in more detail), how many copies of the file to keep,where the multiple copies are to be kept on different tapes, whether thefile is to be encrypted or compressed, etc. The policies 428 may bedefined with respect to the directories presented with respect to theFUSE module 412 such that those policies may be defined with respect toall files within that directory. Policy management module 430 allowsthese policies to be managed (e.g., created, updated, defined, deleted,modified, etc.) by a user or otherwise. Policies can be defined at anylevel of the directory structure provided by FUSE module 412. Because adirectory presented by FUSE module 412 may be presented as a sharedvolume by network file system interface module 413, a policy thatapplies to the directory may also apply to the share.

In operation then, Archive Node Appliance 400 may present a networkbased file system accessible through an interface, where the filesassociated with the network based file system may be stored on the tapelibrary 410 according to a file system structure that substantiallymirrors the file system structure of the presented network based filesystem. In one embodiment, mirroring the file system structure of thepresented network based file system means that at least a portion of thepath of the location of the file as it is stored on the tape library 410may be substantially similar to the path of the location of the file asit is presented through the file system.

More specifically, users at host devices coupled to the Archive NodeAppliance 400 may perform directory operations and store or read filesusing an interface for the network based file system provided by theArchive Node Appliance 400. In accordance with these user initiatedoperations, commands in the network file system protocol 414 employed bythe interface may be received at the Archive Node Appliance 400 andimplemented by FUSE module 412 with respect to the partitions of datastore 418. If the command is associated with a directory operation itmay be processed by directory operations module 420. If the command isfor the storing of a file, the I/O operations module 422 may write thisfile to a location in the data store 418. Map 442 may be updated tocomprise a mapping between the location and name of the file withrespect to the FUSE file system and the name and location of that filein the data store 418.

In one embodiment, the file is stored in the data store 418 according tothe one or more policies that apply to that file. For example, if apolicy that applies to the file specifies that the file should becompressed the file may be compressed before the file is stored in thedata store 418. Similarly, if an applicable policy specifies that thefile is to be encrypted the file may be encrypted before it is stored inthe data store 418. In certain embodiments, a self-encrypting disk, fulldisk encryption or a RAID controller which performs encryption may beutilized in conjunction with data store 418, such that all files storedin the data store 418 may be encrypted by the disk or controller whenthe file is stored to the data store 418. In such cases, all filesstored to the data store 418 may be encrypted when stored to data store418 and decrypted when read from data store 418.

Based on one or more of the policies 428, at some later point a file maybe migrated to the tape library 410. As policies 428 may be definedbased on a location associated with the presented file system, policiesassociated with the location (e.g. directory, share, etc.) where thefile is stored may be determined from policies 428 and the determinedpolicies applied to migrate the file.

As the file may be received over a network, errors may occur during thetransmission of the file or the storage of the file to the data store.To account for network errors or the like, in one embodiment, a timeperiod referred to as the migration timeout period is utilized. Morespecifically, when a file is first stored to the data store an amount oftime equal to the migration timeout period may be allowed to elapsebefore the file is migrated. As discussed above, such a migrationtimeout period may be implemented as a policy. Thus, for example, apolicy defining such a migration timeout period may be associated with ashare or directory as visible through the network based file systemimplemented by the Archive Node Appliance.

In any event, once a file is selected for migration, the one or morepolicies 428 associated with that file may be utilized to migrate thefile accordingly (e.g., encrypted, compressed, neither encrypted norcompressed, whether multiple copies of the file are to be maintained, ifthe file is to be replicated, etc.).

An appropriate tape on which to store the file may be determined andlocated using the index 436. If the appropriate tape is not currently ina drive of the tape library, library control module 434 may be utilizedto load the appropriate tape into a drive of the tape library 410. Morespecifically, in most cases when an LTFS tape is formatted it isspecified whether the data on that tape is to be compressed or not.Thus, the selection of an appropriate tape may include selecting a tapethat is formatted according to a policy specified for the file beingmigrated (e.g., a tape formatted to hold compressed data may be selectedif a policy specifies the file is to be compressed, etc.), selecting atape that has a location associated with a location where the file is tobe stored (e.g., a directory in the path of the location where the fileis to be stored, etc.), etc. The selection of an appropriate tape mayalso involve other considerations not expressly enumerated.

The file system on the appropriate tape may be mounted using LTFSmanagement module 432. File migration module 426 may use LTFS module 424to copy the file from data store 418 to the appropriate tape at alocation on the tape which corresponds to the location of the file aspresented through the file system to the host devices coupled to theArchive Node Appliance. After the file is copied to the tape, all, or aportion of, the file may be deleted off of the data store. Accordingly,the migration may entail the creation of one or more directories on themounted LTFS file system on the tape, where these directories may mirrorthe directories in the path where the file is stored that are visible toa user at a host device using the network based file system presented bythe Archive Node Appliance 400. Additionally, when the file is copied tothe mounted LTFS file system on the appropriate tape, actions may betaken to implement policies applicable to the file.

For example, if a policy that applies to the file specifies that thefile should be compressed, the media drive can be instructed to compressthe file. In one embodiment, the use of LTFS may simplify thiscompression. Specifically, if a file is to be compressed the selectionof an appropriate tape formatted to store compressed data may indicateto the LTFS module 424 that data to be stored on the tape is to becompressed. The LTFS module 424 may configure the drive holding thattape to compress data such that when the file is stored to the tapeusing LTFS module 424 it is compressed as it is stored.

Similarly, if an applicable policy specifies that the file is to beencrypted, the drive can be instructed to encrypt the file. Encryptionof the file being stored may be accomplished by the tape drive in whichthe appropriate tape is located. Specifically, before mounting the LTFSfile system on the appropriate tape one or more commands (for example,SCSI or other types of commands that may or may not include keyinformation to be utilized) may be sent to the drive to cause it to useencryption. The LTFS file system can then be mounted on the tape. LTFScan then be used to store the file on the tape while the tape drivehandles the encryption of the data transparently to LTFS.

Other embodiments may accomplish compression or encryption of the filesin different manners. For example, in one embodiment, to speed themigration of files, Archive Node Appliance may provide hardware supportfor such encryption or compression. Embodiments of methods and systemsfor such encryption or compression are discussed in U.S. patentapplication Ser. No. 12/025,081, entitled “System and Method ForEnabling Encryption”, by Robert C. Sims, filed on Feb. 4, 2008 which ishereby incorporated by reference for all purposes.

Additionally, if a policy 428 associated with the file specifies thatmultiple copies of a file are to be maintained a second tape on which tostore the file may be determined and the file migration module 426 mayuse LTFS module 424 to copy the file from data store 418 to the secondtape at a location on the second tape which corresponds to the locationof the file as presented through the FUSE file system. Notice here thattwo separate tapes may have the file stored using an LTFS file systempath that mirrors the path of that file as presented through the FUSEfile system. Furthermore, if a policy associated with the file specifiesthat the file is to be replicated the file may also be sent to anotherArchive Node Appliance.

When a command to read a file is received, map 442 may be consulted todetermine the location of the file (e.g., whether it is located in datastore 418, on a tape in the tape library 410 or both). If the requestedfile is completely on the data store 418, I/O operations module 422 mayrespond to the read of the file using the file as stored in the datastore 418. If the file is on a tape (and not entirely in the data store418), the tape on which the file is located may be determined using themap 442. The index 436 and the library control module 434 can then beutilized to determine if the tape is in a drive, and if not, to load theappropriate tape into a drive of the tape library 410. The file systemon the tape may be mounted using LTFS management module 432. I/Ooperations module 422 can then use LTFS module 424 to access the file onthe tape and respond to the read of the file.

It will be noted here that certain actions may be taken in associationwith the read file before the file is used to respond to the read. Inparticular, in certain embodiments, actions associated with one or morepolicies applicable to the file may be performed. For example, if apolicy that applies to the file specifies that the file should becompressed, the file may be decompressed as the file is read from thetape and before the file is used to respond to the read of the file. Inone embodiment, the use of LTFS may simplify this decompression.Specifically, the tape on which the file is stored may be formatted tostore compressed data. The presence of this type of tape in the drivemay indicate to the LTFS module 424 that data stored on the tape iscompressed. The LTFS module 424 may thus configure the drive holdingthat tape such that when the file is read from the tape using LTFSmodule 424 it is decompressed.

Similarly, if an applicable policy specifies that the file is to beencrypted the file may be decrypted before the file is used to respondto the read of the file. As LTFS may not support encryption, in oneembodiment, decryption of the file being stored may be accomplished bythe tape drive in which the appropriate tape is located. Specifically,before mounting the LTFS file system on the tape on which the file isstored one or more commands (for example, SCSI or other types ofcommands that may or may not include key information to be utilized) maybe sent to the drive to cause it to decrypt the file. The LTFS filesystem can then be mounted on the tape. LTFS can then be used to readthe file while the tape drive handles the decryption of the datatransparently to LTFS. The file is then used to respond to the read ofthe file.

In many cases, however, if the file is located on tape, it may take arelatively long amount of time to access the file. This situation may beexacerbated if, for example the file system on the tape is not currentlymounted, the tape itself is not currently in a drive of the tapelibrary, the tape is currently positioned at a location far away fromthe location where the file is located, etc. These conditions can resultin an access time for a file on tape that is on the order of minutes.

Many network based file system protocols have timeout conditions. Forexample, in the CIFS protocol, an OPEN or a READ command must beresponded to within 30 seconds or a timeout condition will occur. Thetimeout condition may be dependent on the type of network file systemsused. In some cases, the timeout period is negotiated between a host andfile system. Thus, the Archive Node Appliance 400 can be configured tonegotiate the timeout time with hosts. The timeout time can be set in aconfiguration setting for Archive Node Appliance 400. As a result, thetime period for responding to such a command may be less than thatneeded to access the file on the tape. In order to present network basedfile systems based on these types of protocols such conditions may needto be addressed.

To that end, in some embodiments, read cache 450 may be maintained ondata store 418. Read cache 450 may comprise the first portion 452 ofeach file stored using the network based file system presented by theArchive Node Appliance 400. The portion of the file in read cache 450acts as a “stub file,” which can be presented by the FUSE file systemfor example as being the full file while some of the data of thecorresponding full file is not in the data store but is stored on tape.When a file is read, then, if any portion of the file is to be read fromtape the first portion 452 of the read file that is stored as the stubfile may be used to respond to the read request, while the file on thetape is located and read substantially simultaneously. Since the firstportion 452 of the file is stored in the read cache 450 on the datastore 418 it can be accessed quickly enough that a timeout on commandscan be avoided while the file on the tape is accessed. The remainder ofthe file can then be read from the tape and used to respond to thecommands.

The size of the first portion 452 of each file may be user configurable,based on system parameters, or defined in some other manner. In oneembodiment, the read cache size may be based on directories provided bythe FUSE module 412 so that all the files within the directory are aparticular size. If the directory is presented as a share, the policythus applies to files within the share. In another embodiment, the sizeretained on read cache 450 may be dependent upon the size of blocks thatmay be read in a single operation via the network file system, the settime for a timeout and the time required to load, mount and position atape with the requested file.

When a host device wishes to read a file it may send OPEN and READcommands to the Archive Node Appliance 400. I/O operations module 422may determine if the requested file is completely in the data store 418using map 442. If so, I/O operations module 422 may respond to the readof the file using the file in the data store 418.

If however, the file is only on a tape, the tape on which the file islocated may be determined using the map 442. The I/O operations module422 can then initiate the load and access of the file on the tape usingthe library control module 434 and the LTFS management module 432. I/Ooperations module 422 delays the response to the initial OPEN commandfor a time period less than the timeout associated with the receivedcommand. In some embodiments, this time period may be the longest timeperiod that does not result in a timeout occurring (e.g., 20 seconds, 29seconds, etc.).

The host device may subsequently send a READ command for a certainamount (e.g., 64K or a different amount) of the file to the Archive NodeAppliance 400. I/O operations module 422 can delay the response to thisREAD command as long as possible without a timeout resulting (e.g., 20second, 29 seconds, or other time period). After the delay, the I/Ooperation module 422 will respond to the command with the data requestedfrom the stub file. The I/O operations module 422 may continue to delayresponses to subsequent READ commands and utilize data from the readcache 450 to respond to the READ commands until data from the firstportion 452 is exhausted or the LTFS file system on the appropriate tapeis mounted and the file on the tape can be accessed using LTFS module.The I/O operations module may continue to delay responses anddynamically switch between delaying responses and not delaying responsesas needed.

In addition to delaying responses, Archive Node Appliance 400 can returnless data than requested by the host. For example, Archive NodeAppliance 400 may return 1K instead of the requested 64K. WhetherArchive Node Appliance 400 returns less data than the amount requestedmay depend on the network file system protocol, host operating system orother factors. Returning less data than requested provides the advantagethat the read cache can be smaller.

When the appropriate tape is loaded, I/O operations module 422 may thenuse LTFS module 424 to access the file on the tape and respond tosubsequent READ commands for the file. More specifically, in oneembodiment I/O operations module 422 may utilize LTFS module 424 toaccess the file on the appropriate tape and read the file from the tapeinto buffer 444. Subsequent READ commands for the file may be respondedto using the data in the buffer 444.

Furthermore, in some embodiments, in addition to reading the file intobuffer 444 the file may also be read into a file cache 460 on the datastore. File cache 460 may be an area on data store utilized fortemporary storage of files and may be managed according to almost anycache management technique desired. In certain cases if a host does notrequest data of the file at a particular rate (e.g., does not issue READcommands frequently enough, or the READ commands do not request acertain amount of data, etc.), after a certain number of READ commandsI/O operations module 422 may respond to subsequent READ commands forthe file using data of the file from the file cache.

In certain embodiments the opposite may also occur. More specifically,in some instances the reading of file data to the file cache 460 inaddition to reading the file into buffer 444 may slow the response torequests for data from the host. In this case, reading the file datainto both buffer 444 and file cache may mean that data cannot bedelivered at the rate the user is requesting the data or may otherwiseslow the response to user requests. Here, the reading of the data of thefile into the file cache 460 may be stopped before the entire file is inthe file cache such that requests for the file may be serviced morequickly. Thus, the portion of the file that is in file cache 460 maycomprise none, some, or all, of a file.

In one embodiment, the file may be stored in the file cache 460 byappending any portions of the file which are read from the tape to thefirst portion 452 of the file in the read cache 450 if such a firstportion of the read file exists in read cache 450. Thus, if the firstportion 452 exists in the read cache 450 when any portion of the filenot comprised by first portion 452 in the read cache is read from thetape it may be appended to the first portion 452 already stored in theread cache 450. The entire file may be stored in the file cache 460 whenthe file is read. At a later point, if portions of the file are deletedfrom the file cache 460 the first portion 452 of the file may be left onthe data store 418 such that the first portion 452 of the file is inread cache 450.

As discussed above, stub files in read cache 450 can be used to preventtime out errors. Read cache 450 can be populated when the files arestored to the media library. A network file system interface client mayrequest to store a file (which may comprise multiple commands in a filesystem protocol), where the file may be associated with a name and apath as visible through the network based file system implemented by theArchive Node Appliance. The file can be stored on a location on datastore 418 where the file may have a different name and be located at apath associated with the data store. When the file is written to alocation on a tape, the file data other than the first portion 452 canbe deleted from data store 418, leaving the stub file. The data in theread cache 450 may be stored in a manner corresponding to the format inwhich the file is stored on the tape. Thus, for example, if the file iscompressed when it is migrated to tape, the read cache 450 may comprisethe first portion 452 of the file in compressed format.

To ensure the integrity of stub files, hash codes for each stub file canbe maintained (stub file hash codes 480) and backed up. In oneembodiment, a hash code for a stub file is calculated and stored when astub file is created. Each time a stub file is accessed, a hash code isgenerated for the stub file and the generated hash code compared to thestored hash code for the stub file. A difference between the hash codesmay indicate corruption of the stub file that the RAID system is readingthe wrong sector or is otherwise performing incorrectly and errorprocessing can occur.

Stub files in read cache 450 may be deleted, become corrupted orotherwise become inaccessible. In a large scale fault, for example, theentire read cache 450 may be lost (e.g., due loss of a RAID set or otherfailure). Rather than restoring the entire read cache at once, whichwould require high resource utilization and a large backup capacity,read cache 450 may be repopulated as files are accessed by clientsthrough the network file system interface.

Accordingly, when a file is read by a network file system interfaceclient and the first portion 452 of the read file is not in read cache450, the file may be read from tape and used to respond to the read. Thefile data read from tape may be used to repopulate the read cache 450 bystoring the first portion 452 of the file into the read cache 450 atthat time (embodiments of which will be discussed in more detail below).Furthermore, file data from the tape can be read into file cache 460 sothat the entire file is on data store 418 as discussed above. Thus, at alater point, if portions of the file are deleted from file cache 460,the first portion 452 of the file may be left on the data store 418 suchthat the first portion 452 of the file is in read cache 450.

It may be useful to discuss embodiments of the storage of configurationsuch as mapping data, index data, policies, file meta-data, tape-librarydata, etc. that may be utilized by an Archive Node Appliance.Embodiments of such storage methods and formats may be used, forexample, to store the map, index and policies as discussed above.Preferably, mapping data, index data, policies, file meta-data,tape-library data, etc. are stored on a separate physical storage mediafrom read cache 450 so that if the storage media that stores read cache450 becomes corrupted or inoperable, the mapping data, index data,policies, file meta-data, tape-library data, etc. are still available.Thus, for example, mapping data, index data, policies, file meta-data,tape-library data, etc. can be stored on separate RAID sets from readcache 450.

Furthermore, all or a portion of data store 418 may be backed up tointernal backup storage 470 (e.g., an internal SSD) or external back upstorage 475 (e.g., to network attached storage, a direct attachedstorage array or otherwise). In one embodiment, in order to reducebackup storage requirements read cache 450 is not backed up. In anotherembodiment, stub files from read cache 450 corresponding to the mostfrequently accessed files (or stub files for files meeting othercriteria) can be backed up, while the remainder of read cache 450 isnot.

FIGS. 5A-5D depict one embodiment of a schema for a database that may beutilized in conjunction with embodiment of an Archive Node for mappingdata, index data, policies, file meta-data, tape-library data, etc. Allor a portion of the database can be backed up to external or internalbackup storage to facilitate recovery.

Turning first to FIG. 5A, one embodiment of a table schema for thestorage of data relating to files and directories is depicted. In thisschema, there is a node table 502, a storage location table 504, astorage media table 506, a disk table 508, a storage type table 510, alocation statuses table 512, a Disk to Tape File System (used to referto embodiments of an implementation of a file system using an ArchiveNode, also known by the acronym DTFS) settings table 516, DTFS userstable 518, DTFS groups table 520, tape drives table 522, tapes table 524and storage method types table 526.

Storage locations table 504 may comprise information on locations wheredata can be stored in conjunction with an Archive Node and thus entriesin the storage location table 504 may be linked to entries in thestorage media table 506. Entries in storage media may, in turn, belinked to entries in the disk table 508 that are associated with a datastore of the Archive Node and entries in tapes table 524 that areassociated with tapes in the tape library of the Archive Node. Entriesin storage locations table 504 may also be linked to entries in tapedrives table 522 that are associated with drives in the tape library ofthe Archive Node. Entries in the storage location table 504 may also beassociated with a state and a status as represented by entries in thelocation states table 514 or the location statuses table 512.

Nodes table 502 comprises entries which are associated with a file or adirectory as presented by the FUSE file system. In general the top leveldirectory used by a FUSE file system of an archive node appliance can bea universally unique identifier (UUID) associated with the archive nodeappliance. Examples of such an identifier include, but are not limitedto, a serial number, a software license number or other uniqueidentifier. The use of a UUID as the top level directory by archive nodeappliances ensures that path names to files stored by that archive nodeappliance will not conflict with the path names used at a second archivenode appliance if the tape if transferred to the second archive nodeappliance. For an implementation that stores hash codes for stub files,the stub file hash codes may be stored as part of node table 502 orelsewhere.

Entries in the node table 502 are linked with entries in the DTFS userstable 518 where these entries may represent users of the DTFS filesystem (which may be defined by an administrator, based on the networkbased file system implemented by the Archive Node, etc.). Each of theentries in node table 502 may also be linked with entries in the storagelocation table 504 such that a link between an entry in the node table502 associated with a file or directory may be linked with one or moreentries in the storage location table 504 associated with a disk or tapewhere that file or directory is stored.

In the case in which an archive node appliance is part of a WindowsActive Directory domain, active directory does not use Unix-like userIDS and group IDs to identify users. Active directory uses stringsreferred to as security identifiers (SID) for this purpose. Accordingly,the DTFS user table 518 and DTFS groups table 520 may include an entryfor a user group SID that links the SID to the DTFS user id and, ifapplicable, to the appropriate Unix user ID (UID) and group ID (GID).

Moving now to FIG. 5B one embodiment of a table schema for the storageof data relating to tapes and tape libraries of an Archive Node isdepicted. In this schema, there is a tapes table 524, tape locationstable 532, libraries table 530, tape statuses table 542, tape typestable 540, library statuses table 562, library states table 560, tapelocation types table 558, mailbox table 538, slot table 536, tapesessions table 554, tape micro sessions table 556, tape drive typestable 546, tape drives table 534, tape drive affinities table 552, tapedrive statues table 548 and tape drive states table 550.

Entries in tapes table 524 may be associated with an entry in tapelocations table 532 associated with a location of tape in a tape library(for example, a slot, drive, etc.). Each of the entries in tape locationtable 532 may be associated with an entry in slot table 536 associatedwith a slot in a tape library or an entry in tape drives table 544associated with a drive in the tape library. Furthermore, entries intape locations table 532 and tapes table 524 are linked with an entry inlibraries table 530 associated with a tape library of the Archive Node(of which there may be one or more, as discussed above). In this manner,an entry in tapes table 524 associated with a tape can be associatedwith an entry in library table 530, slot table 536 or tape drive table544 associated with the location of that tape.

Entries in tape drive table 544 may be also linked to an entry in tapedrive types table 546 associated with a type of the drive, or an entryin tape drive statuses table 548 or tape drive states table 550associated with a statuses or state of a tape drive. Entries in tapestable 524 may also be linked to entries in tape status table 542 andtape types table 540 associated with a type or a status of a tape.

Turning to FIG. 5C one embodiment of a table schema for the storage ofdata relating to policies applicable to directories in an Archive Nodeis depicted. In this schema, there is nodes table 502, directorypolicies table 564, policies table 566, policy types table 568, policyvalues table 570 and policy arguments table 572. Entries in directorypolicies table 564 may be associated with polices to be applied todirectories (and thus to files stored in those directories). Entries indirectory policies table 564 may be linked to entries in node table 502associated with a directory. In this manner, entries in directorypolicies table 564 associated with policies to be applied to directoriesmay be linked to entries in nodes table 502 associated with a directoryagainst which that policy is to be applied. It will be noted that asimilar schema could be utilized to associate file policies with files,share policies with shares, etc.

Entries in directory policies table 564 may also be linked to an entryin policies table 566 that may be associated with a particular policy.Entries in policies table 566 may, in turn, be linked with an entry inpolicy types table 568 that is associated with a type of policy (forexample, encryption or compression policy, number of copies to keep,replication, etc.). Thus, an entry in policies table 566 associated witha particular policy may be linked with an entry in policy type table 568associated with the type of that policy.

FIG. 5D depicts one embodiment of a table schema for collecting data onnodes in an Archive Node. In this schema, there is nodes table 502,ingest rates table 574 and reporting durations table 576. Thus, entriesin the node table 502 can be linked to entries in ingest rates table 574associated with statistics on the creation, reception, storage,migration, etc. of a file or directory.

FIG. 5 is provided by way of example and not limitation and the archivenode appliance may store other metadata for files, directories, users,etc. According to one embodiment, for example, the FUSE file system maysupport extended attributes that are not used directly by the FUSE filesystem, but can be stored by clients and exposed through the FUSE filesystem. Extended attributes for a file or directory may be stored in thenode table 502 for the file or directory other table. For example, amedia management system may organize files based on the type of projectwith which the media is associated and therefore include an extendedattributes such as project:soundtrack for files.

From a review of the above, it will be apparent that embodiments of suchArchive Nodes may provide a highly effective manner of implementing anetwork based file system using a tape library. In some instances,however, it may be desired to provide a high level of availability orincreased performance in conjunction with network based file systems. Assuch, in certain embodiments Archive Node Appliances may be clustered toprovide increased performance or a higher degree of fault tolerance asdescribed, for example, in U.S. patent application Ser. No. 13/109,192,entitled “System and Method for Implementing a Networked File SystemUtilizing a Media Library”, filed May 17, 2011, which is hereby fullyincorporated by reference herein.

Referring now to FIG. 6, a method for storing a file using an embodimentof an Archive Node, including an Archive Node Appliance is depicted. Atstep 610 a request (which may comprise multiple commands in a filesystem protocol) to store a file may be received at the Archive NodeAppliance, where the file may be associated with a name and a path asvisible through the network based file system implemented by the ArchiveNode Appliance. For example, the path of the file may be path/patient_records and the file name may be Patient1.doc. The file is thenstored on a location on the data store of the Archive Node Appliance atstep 620, where the file may have a different name and be located at apath associated with the data store. For example, the path of the fileas stored on the data store may be /data3 and the file name may be550e8400-e29b-41d4-a716-446655440000.

In one embodiment, as discussed above, the file is stored in the datastore according to one or more policies that apply to that file. Forexample, if a policy that applies to the file (for example, the policyis associated with the location associated with the network based filesystem where the file is stored) specifies that the file should becompressed the file may be compressed before the file is stored in thedata store. Similarly, if an applicable policy specifies that the fileis to be encrypted the file may be encrypted before it is stored in thedata store.

The map can then be updated at step 630 to associate the name and thepath of the file as visible through the network based file system withthe path and name of the file as stored on the data store. Thus, in thisexample the path /patient_records and file name Patient1.doc, as visiblethrough the network based file system is associated with the path /data3and file name 550e8400-e29b-41d4-a716-446655440000 associated with thefile as stored in the data store.

Subsequently, one or more policies to be applied to the file can bedetermined at step 640. The policies may be applied in conjunction withthe migration of the file at step 650. As discussed above, in oneembodiment one policy may specify that a migration timeout period is tobe applied to the file before the file is migrated. This migrationtimeout period may specify a time period such that an amount of timeequal to the migration timeout period may be allowed to elapse beforethe file is migrated. Thus, if such a policy exists the migrationtimeout period may be allowed to elapse before the file is migrated.

To migrate the file, one or more tapes on which to store the file may bedetermined. This determination may be based on the policies that havebeen determined to apply to that file. For example, the number of tapesdetermined may be based on a policy specifying that the file is to bemaintained on multiple tapes. If so, two different tapes on which tostore the file may be determined. If a policy to apply to the filespecifies that the file is to be encrypted a tape comprising encrypteddata may be selected. Similarly, if a policy to apply to the filespecifies that the file is to be compressed a tape comprising compresseddata may be selected. Assume for purposes of example that the tape onwhich it is determined to store the file has a TapeID of AN02394.

Each of the tapes on which it is determined to store the file can thenbe loaded into a drive, if it is not already in a drive, and the LTFSfile system mounted. Specifically, the tape may be located using theindex that maintains the location of each of the tapes in the libraryand loaded into a drive. The file can then be copied from its locationon the data store to a location on the tape. In one embodiment, a paththat corresponds to the path of the file as visible through the networkbased file system may be created on the tape using the LTFS file systemif it does not already exist. The file can then be saved using the namethat corresponds to the name of the file as visible through the networkbased file system. Continuing with the above example, the path/patient_records may be created on the tape having TapeID AN02394 if itdoes not exist and the file may be saved as Patient1.doc on this tape.

In one embodiment, before or during the copying of the file to themounted LTFS file system on the tape, actions may be taken to implementpolicies applicable to the file. For example, if a policy specifies thatthe file is to be replicated it may be sent to another Archive NodeAppliance or if a policy that applies to the file specifies that thefile should be compressed, the Archive Node Appliance can cause the fileto be stored on a compressed tape. Similarly, if an applicable policyspecifies that the file is to be encrypted the Archive Node Appliancecan cause the file to be stored on an encrypted tape.

The map can then be updated at step 660 to associate the tape on whichthe file is stored, the name and the path of the file as visible throughthe network based file system, the path and name of the file as storedin the data store and the path and name of the file as stored on thetape. Thus, in this example the path /patient_records and file namePatient1.doc, as visible through the network based file system isassociated with TapeID AN02394, the path /data3 and the file name550e8400-e29b-41d4-a716-446655440000 associated with the file as storedin the data store.

At step 670 the file, or portions thereof, may be deleted from the datastore. In some embodiments, as it is desired to maintain the firstportion of a file in a read cache in the data store, all portions of thefile except this first portion may be deleted from the data store. Itwill be noted therefore, that in certain embodiments, the path and nameof the file in the map that is associated with the file as stored in thedata store may describe the location of the first portion of the filestored in the read cache. The steps of FIG. 6 can be repeated as neededor desired.

Turning now to providing a file to a network file system interfaceclient, an Archive Node Appliance may respond to read requests from aclient using data from a stub file until the tape containing the file ismounted and data can be provided from the tape. However, in some cases,the read cache may be lost due to corruption, loss of a RAID set or thelike. Therefore, in order to maintain the advantages of the stub files,the Archive Node Appliance may restore the read cache.

FIG. 7 depicts one embodiment a method for restoring a read cache usingone embodiment of an Archive Node Appliance. At step 710 archive nodeconfiguration data such as the mapping data, index data, policies, filemeta-data, tape-library data, etc. may be restored from backup storageif required. At step 712, the stub files can be restored. The stub filescan be restored in a variety of manners. Stub files that were backed upcan be restored from back up while stub files that were not backed upcan be restored by reading the corresponding file from tape and storingthe stub file in the read cache. In particular, stub files may berestored on an ad hoc basis when a network file system interface clientrequests to read the corresponding file.

A stub file can be restored to the same directory location at which thestub file was located prior to loss of the read cache. Thus, forexample, if the stub file for /patient_records/Patient1.doc was storedat /data3/550e8400-e29b-41d4-a716-446655440000 prior to loss of the readcache, the stub file can be restored to location/data3/550e8400-e29b-41d4-a716-446655440000, (which may be on a new harddrive). In other cases, the stub file may be restored to a new directorylocation. The map can be updated to associate path /patient_records andfile name Patient1.doc with the new location in the data store.

Ad hoc restoration of stub files can be integrated with replying to readrequests from network file system interface clients. FIG. 8 depicts oneembodiment of a method for reading a file using an embodiment of anArchive Node appliance. At step 810, a request to read a file may bereceived. This request may comprise multiple commands in a file systemprotocol as discussed above. The location of the file can be determinedat step 820, where the file may be located in the data store of theArchive Node Appliance, on a tape in the tape library or both. If therequested file is completely on the data store (e.g., as determined atstep 825), the read and subsequent requests may be responded to usingthe file as stored in the data store (step 830). The file may becompletely on the data store for a variety of reasons, for example, thefile has been stored on the data store, but a migration timeout periodassociated with the file has not yet expired and thus the file has notyet been migrated; the file has been migrated but has not been deleted;the file was previously migrated but was subsequently read and placed inthe file cache on the data store; etc.

If the file is not completely in the data store, the tape on which thefile is located may be determined at step 840. The movement of the tapeinto a drive, if needed, and the mounting of the file system on the tapemay be initiated at step 850. Further, it can be determined if the firstportion of the file (e.g., the stub file) is in the read cache at step860. If the first portion is in the read cache it may be used to respondto the initial requests for file data at step 870 and some number ofsubsequent requests until the proper tape volume is mounted (see e.g.,step 875). As described in U.S. patent application Ser. No. 13/267,665,entitled “System, Method and Computer Program Product for Trickling Datato a Host,” filed Oct. 6, 2011, which is hereby fully incorporated byreference herein, data may be trickled from the read cache to a clientto allow the tape time to load.

Prior to responding to the read request, a hash code can be generatedfor the stub file and compared to a stored hash code for that stub file.If the generated and stored hash codes for the stub file do not match anerror can be generated or other action taken. If the generated andstored hash codes do match, the stub file may be used to respond to theread request.

When the file system on the tape is mounted, the file on the tape may beread and used to respond to subsequent requests for file data at step880. When responding to the requests for file data using the file on thetape, the file may be read into a buffer and data from the buffer usedto respond to requests. In addition, data from the buffer may betransferred to the data store (step 890) so that, for example, theentire file can be stored in the data store.

If the Archive Node Appliance is responding to requests for file datafrom the tape, but the client is requesting data at an insufficient rateto maintain tape streaming, the Archive Node Appliance may switch tousing data from the file cache to respond to requests from the clientfor the file data while still streaming data to the buffer in order topopulate the file cache. Thus, with respect to network file systeminterface clients, the Archive Node Appliance may switch from providingfile data from the data store to providing the file data from the tapeas needed.

Returning to step 860, if there is no stub file in the data store when afile is requested by the network file system interface client, theArchive Node Appliance can wait for the volume containing the requestedfile to be mounted (step 895). If the requesting host does not time out,the file data may be read from tape and used to respond to the requestsfor file data at step 880. Furthermore, the file data can be stored inthe data store (step 890) to populate the read cache and file cache. Ifthe client requests file data at an insufficient rate to maintain tapestreaming, the Archive Node Appliance may switch to using data from thedata store to respond to requests for the file data while stillcontinuing to populate the data store with file data from the media.

There is some chance that a requesting client will timeout (e.g., asdetermined at decision block 897) before a tape volume can be mountedand data provided to the client. In such a case, the Archive NodeAppliance can still mount the volume so that tape data can be read intothe data store (step 890). Enough tape data can be read and stored inthe data store to populate the read cache with a stub file correspondingto the requested file. The Archive Node Appliance may continue topopulate the data store with data read from the media until the entirefile is stored in the data store. At a later time, a portion of the filedata can be deleted from the data store, leaving the stub file.

Thus, stub files can be recovered on an ad hoc basis by populating thestub file when the corresponding file is requested by a network filesystem interface client. In such an implementation, resources areconserved because only the stub files for files that are needed arerecovered.

In addition to storing the stub file, a hash code for the stub file canbe generated and stored for the stub file. This can be done once thereis sufficient data in the data store to form the stub file or after theentire file is stored in the read cache.

Although the invention has been described with respect to specificembodiments thereof, these embodiments are merely illustrative, and notrestrictive of the invention. The description herein of illustratedembodiments, including the description in the Abstract and Summary, isnot intended to be exhaustive or to limit the invention to the preciseforms disclosed herein (and in particular, the inclusion of anyparticular embodiment, feature or function within the Abstract orSummary is not intended to limit the scope to such embodiment, featureor function). Rather, the description is intended to describeillustrative embodiments, features and functions in order to provide aperson of ordinary skill in the art context without limiting theinvention to any particularly described embodiment, feature or function,including any such embodiment feature or function described in theAbstract or Summary. While specific embodiments and examples aredescribed herein for illustrative purposes only, various equivalentmodifications are possible within the spirit and scope of thisdisclosure, as those skilled in the relevant art will recognize andappreciate. As indicated, these modifications may be made in light ofthe foregoing description of illustrated embodiments and are to beincluded within the spirit and scope of the invention. Thus, while theinvention has been described herein with reference to particularembodiments thereof, a latitude of modification, various changes andsubstitutions are intended in the foregoing disclosures, and it will beappreciated that in some instances some features of embodiments of theinvention will be employed without a corresponding use of other featureswithout departing from the scope and spirit of the invention as setforth. Therefore, many modifications may be made to adapt a particularsituation or material to the essential scope and spirit of theinvention.

Reference throughout this specification to “one embodiment,” “anembodiment,” or “a specific embodiment” or similar terminology meansthat a particular feature, structure, or characteristic described inconnection with the embodiment is included in at least one embodimentand may not necessarily be present in all embodiments. Thus, respectiveappearances of the phrases “in one embodiment,” “in an embodiment,” or“in a specific embodiment” or similar terminology in various placesthroughout this specification are not necessarily referring to the sameembodiment. Furthermore, the particular features, structures, orcharacteristics of any particular embodiment may be combined in anysuitable manner with one or more other embodiments. It is to beunderstood that other variations and modifications of the embodimentsdescribed and illustrated herein are possible in light of the teachingsherein and are to be considered as part of the spirit and scope of theinvention.

In the description herein, numerous specific details are provided, suchas examples of components and/or methods, to provide a thoroughunderstanding of embodiments of the invention. One skilled in therelevant art will recognize, however, that an embodiment may be able tobe practiced without one or more of the specific details, or with otherapparatus, systems, assemblies, methods, components, materials, parts,and/or the like. In other instances, well-known structures, components,systems, materials, or operations are not specifically shown ordescribed in detail to avoid obscuring aspects of embodiments of theinvention. While the invention may be illustrated by using a particularembodiment, this is not and does not limit the invention to anyparticular embodiment and a person of ordinary skill in the art willrecognize that additional embodiments are readily understandable and area part of this invention.

Any suitable programming language can be used to implement the routines,methods or programs of embodiments of the invention described herein,including C, C++, Java, assembly language, etc. Different programmingtechniques can be employed such as procedural or object oriented. Anyparticular routine can execute on a single computer processing device ormultiple computer processing devices, a single computer processor ormultiple computer processors. Data may be stored in a single storagemedium or distributed through multiple storage mediums, and may residein a single database or multiple databases (or other data storagetechniques). Although the steps, operations, or computations may bepresented in a specific order, this order may be changed in differentembodiments. In some embodiments, to the extent multiple steps are shownas sequential in this specification, some combination of such steps inalternative embodiments may be performed at the same time. The sequenceof operations described herein can be interrupted, suspended, orotherwise controlled by another process, such as an operating system,kernel, etc. The routines can operate in an operating system environmentor as stand-alone routines. Functions, routines, methods, steps andoperations described herein can be performed in hardware, software,firmware or any combination thereof.

Embodiments described herein can be implemented in the form of controllogic in software or hardware or a combination of both. The controllogic may be stored in an information storage medium, such as acomputer-readable medium, as a plurality of instructions adapted todirect an information processing device to perform a set of stepsdisclosed in the various embodiments. Based on the disclosure andteachings provided herein, a person of ordinary skill in the art willappreciate other ways and/or methods to implement the invention.

It is also within the spirit and scope of the invention to implement insoftware programming or of the steps, operations, methods, routines orportions thereof described herein, where such software programming orcode can be stored in a computer-readable medium and can be operated onby a processor to permit a computer to perform any of the steps,operations, methods, routines or portions thereof described herein. Theinvention may be implemented by using software programming or code inone or more general purpose digital computers, by using applicationspecific integrated circuits, programmable logic devices, fieldprogrammable gate arrays, optical, chemical, biological, quantum ornanoengineered systems, components and mechanisms may be used. Ingeneral, the functions of the invention can be achieved by any means asis known in the art. For example, distributed, or networked systems,components and circuits can be used. In another example, communicationor transfer (or otherwise moving from one place to another) of data maybe wired, wireless, or by any other means.

A “computer-readable medium” may be any medium that can contain, store,communicate, propagate, or transport the program for use by or inconnection with the instruction execution system, apparatus, system ordevice. The computer readable medium can be, by way of example only butnot by limitation, an electronic, magnetic, optical, electromagnetic,infrared, or semiconductor system, apparatus, system, device,propagation medium, or computer memory. Such computer-readable mediumshall generally be machine readable and include software programming orcode that can be human readable (e.g., source code) or machine readable(e.g., object code).

A “processor” includes any, hardware system, mechanism or component thatprocesses data, signals or other information. A processor can include asystem with a general-purpose central processing unit, multipleprocessing units, dedicated circuitry for achieving functionality, orother systems. Processing need not be limited to a geographic location,or have temporal limitations. For example, a processor can perform itsfunctions in “real-time,” “offline,” in a “batch mode,” etc. Portions ofprocessing can be performed at different times and at differentlocations, by different (or the same) processing systems.

It will also be appreciated that one or more of the elements depicted inthe drawings/figures can also be implemented in a more separated orintegrated manner, or even removed or rendered as inoperable in certaincases, as is useful in accordance with a particular application.Additionally, any signal arrows in the drawings/figures should beconsidered only as exemplary, and not limiting, unless otherwisespecifically noted.

Furthermore, the term “or” as used herein is generally intended to mean“and/or” unless otherwise indicated. As used herein, including theclaims that follow, a term preceded by “a” or “an” (and “the” whenantecedent basis is “a” or “an”) includes both singular and plural ofsuch term, unless clearly indicated within the claim otherwise (i.e.,that the reference “a” or “an” clearly indicates only the singular oronly the plural). Also, as used in the description herein and throughoutthe claims that follow, the meaning of “in” includes “in” and “on”unless the context clearly dictates otherwise.

Benefits, other advantages, and solutions to problems have beendescribed above with regard to specific embodiments. However, thebenefits, advantages, solutions to problems, and any component(s) thatmay cause any benefit, advantage, or solution to occur or become morepronounced are not to be construed as a critical, required, or essentialfeature or component of any or all the claims.

What is claimed is:
 1. A system for recovering a read cache comprising:a media library, comprising: a set of drives, and a set of media; and anarchive node appliance coupled to the media library and a set of hosts,the archive node appliance comprising a processor, a data store and acomputer readable medium storing a set of computer executableinstructions executable on the processor to: maintain a read cachecomprising portions of files stored on the set of media; present a firstfile as being at a first location in a network based file system, thefirst location comprising a first path; receive a request from a networkfile system interface client for the first file at the first location;locate the first file at a second location on a media of the medialibrary, the second location comprising a second path, wherein thesecond path is a path in a second file system and includes at least aportion of the first path; read the first file from the media of themedia library; and populate the read cache with a stub file for thefirst file using file data read from the second location on the media.2. The system for recovering a read cache of claim 1, wherein the set ofcomputer executable instructions are further executable to restore a setof configuration data from a backup set of configuration data.
 3. Thesystem for recovering a read cache of claim 2, wherein the configurationdata comprises a mapping between the first location and a third locationin a data store, the third location comprising a third path differentthan the first path and second path.
 4. The system of recovering a readcache of claim 3, wherein the set of computer executable instructionsare further executable to populate the stub file at the third file atthe third location.
 5. The system for recovering a read cache of claim1, wherein the set of computer executable instructions are furtherexecutable to respond to one or more subsequent read requests for dataof the first file using file data read from the media.
 6. The system forrecovering a read cache of claim 1, wherein the set of computerexecutable instructions are further executable to respond to one or moresubsequent read requests for data of the first file using file data fromthe data store.
 7. The system for recovering a read cache of claim 1,wherein the media library is a tape library and the set of mediacomprise a set of tapes formatted according to a Linear Tape FileSystem.
 8. A computer program product comprising a non-transitorycomputer readable medium storing a set of computer executableinstructions comprising instructions for: maintaining a read cache ofportions of files stored on media of a media library; receiving arequest from a network file system interface client for a first filepresented as being at a first location in a network based file system,the first location comprising a first path; locating the first file at asecond location on a media of the media library, wherein the secondlocation comprising a second path, wherein the second path is a path ina second file system and includes at least a portion of the first path;reading the first file from the media of the media library; andpopulating the read cache with a stub file for the first file using filedata read from the second location on the media.
 9. The computer programproduct of claim 8, wherein the set of computer executable instructionsfurther comprise instructions for restoring a set of configuration datafrom a backup set of configuration data.
 10. The computer programproduct of claim 9, wherein the configuration data comprises a mappingbetween the first location and a third location in a data store, thethird location comprising a third path different than the first path andthe second path.
 11. The computer program product of claim 10, whereinthe set of computer executable instructions further compriseinstructions to populate the stub file at the third location.
 12. Thecomputer program product of claim 8, wherein the set of computerexecutable instructions further comprise instructions for responding toone or more subsequent read requests for data of the first file usingfile data read from the media.
 13. The computer program product of claim8, wherein the set of computer executable instructions further compriseinstructions for responding to one or more subsequent read requests fordata of the first file using file data from a data store.
 14. Thecomputer program product of claim 8, wherein the media library is a tapelibrary and the media comprise a set of tapes formatted according to aLinear Tape File System.
 15. A method for recovering a read cachecomprising: maintaining a read cache comprising portions of files storedon media of a media library; receiving a request from a network filesystem interface client for a first file presented as being at a firstlocation in a network based file system, the first location comprising afirst path; locating the first file at a second location on a media ofthe media library, wherein the second location comprises a second pathand wherein the second path is a path in a second file system andincludes at least a portion of the first path; reading the first filefrom the media of the media library; and populating the read cache witha stub file for the first file from file data read from the secondlocation on the media.
 16. The method of claim 15, further comprisingrestoring a set of configuration data from a backup set of configurationdata.
 17. The method of claim 16, wherein the configuration datacomprises a mapping between the first location and a third location in adata store, the third location comprising a third path different thanthe first path and the second path.
 18. The method of claim 17, furthercomprising populating the stub file at the third location.
 19. Themethod of claim 15, further comprising responding to one or moresubsequent read requests for data of the first file using file data readfrom the media.
 20. The method of claim 15, further comprisingresponding to one or more subsequent read requests for data of the firstfile using file data from a data store.
 21. The method of claim 15,wherein the media library is a tape library and the media comprise a setof tapes formatted according to a Linear Tape File System.